﻿
using System.Collections.Generic;

namespace System
{
	public abstract class Attribute
	{
		// Methods
		protected Attribute()
		{
		}
	}

	public sealed class ParamArrayAttribute : Attribute
	{
	}

	[AttributeUsage(AttributeTargets.Class, Inherited = true)]
	public sealed class AttributeUsageAttribute : Attribute
	{
		// Fields
		internal static AttributeUsageAttribute Default = new AttributeUsageAttribute(AttributeTargets.All);
		internal bool m_allowMultiple;
		internal AttributeTargets m_attributeTarget;
		internal bool m_inherited;

		// Methods
		public AttributeUsageAttribute(AttributeTargets validOn)
		{
			this.m_attributeTarget = AttributeTargets.All;
			this.m_inherited = true;
			this.m_attributeTarget = validOn;
		}

		internal AttributeUsageAttribute(AttributeTargets validOn, bool allowMultiple, bool inherited)
		{
			this.m_attributeTarget = AttributeTargets.All;
			this.m_inherited = true;
			this.m_attributeTarget = validOn;
			this.m_allowMultiple = allowMultiple;
			this.m_inherited = inherited;
		}

		// Properties
		public bool AllowMultiple
		{
			get { return this.m_allowMultiple; }
			set { this.m_allowMultiple = value; }
		}

		public bool Inherited
		{
			get { return this.m_inherited; }
			set { this.m_inherited = value; }
		}

		public AttributeTargets ValidOn
		{ get { return this.m_attributeTarget; } }
	}

	[Flags]
	public enum AttributeTargets
	{
		All = 0x7fff,
		Assembly = 1,
		Class = 4,
		Constructor = 0x20,
		Delegate = 0x1000,
		Enum = 0x10,
		Event = 0x200,
		Field = 0x100,
		GenericParameter = 0x4000,
		Interface = 0x400,
		Method = 0x40,
		Module = 2,
		Parameter = 0x800,
		Property = 0x80,
		ReturnValue = 0x2000,
		Struct = 8
	}

	[AttributeUsage(AttributeTargets.Enum, Inherited = false)]
	public class FlagsAttribute : Attribute
	{
		// Methods
		public FlagsAttribute()
		{
		}
	}
}

